package com.woniu.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.PageData;
import com.woniu.entity.dto.QueryOrderInfoDTO;
import com.woniu.entity.vo.OrderInfoVo;
import com.woniu.enums.OrderStatus;
import com.woniu.pojo.OrderInfo;

import java.util.List;

public interface OrderInfoService extends IService<OrderInfo> {

    OrderInfo createOrderByProductId(Long productId,Long userId, String paymentType);

    void saveCodeUrl(String orderNo, String codeUrl);

    List<OrderInfo> listOrderByCreateTimeDesc();

    void updateStatusByOrderNo(String orderNo, OrderStatus orderStatus);

    String getOrderStatus(String orderNo);

    List<OrderInfo> getNoPayOrderByDuration(int minutes, String paymentType);

    OrderInfo getOrderByOrderNo(String orderNo);
    
    List<OrderInfoVo> listInfo();

    PageData searchPage(Integer currentPage, Integer pageSize, QueryOrderInfoDTO queryOrderDTO);

    boolean selectOrder(Integer userId, Integer trainingId);
}
